home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / TextEdit.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  25.8 KB  |  905 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextEdit.a
  3. ;
  4. ;    Contains:    TextEdit Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  18. __TEXTEDIT__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  24.     include 'Quickdraw.a'
  25.     ENDIF
  26.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  27.     include 'MixedMode.a'
  28.     ENDIF
  29.  
  30.  
  31.  
  32. ; typedef TERec *                        TEPtr
  33.  
  34. ; typedef TEPtr *                        TEHandle
  35.  
  36. ;  
  37. ;    Important note about TEClickLoopProcPtr and WordBreakProcPtr
  38. ;
  39. ;    At one point these were defined as returning the function result in the 
  40. ;    condition code Z-bit.  This was correct, in that it was what the 68K
  41. ;    implementation of TextEdit actually tested.  But, MixedMode had a different 
  42. ;    idea of what returning a boolean in the Z-bit meant.  MixedMode was setting
  43. ;    the Z-bit the complement of what was wanted.  
  44. ;    
  45. ;    Therefore, these ProcPtrs have been changed (back) to return the result in
  46. ;    register D0.  It turns out that for register based routines, 
  47. ;    MixedMode sets the Z-bit of the 68K emulator based on the contents 
  48. ;    of the return result register.  Thus we can get the Z-bit set correctly.  
  49. ;    
  50. ;    But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
  51. ;    or WordBreak routine, register D0 had better have the result (in addition
  52. ;    to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
  53. ;    WordBreak routines set register D0 at the end.
  54. ;
  55.  
  56.  
  57. ;  
  58. ;    There is no function to get/set the low-mem for FindWordHook at 0x07F8.
  59. ;    This is because it is not a low-mem ProcPtr. That address is the entry
  60. ;    in the OS TrapTable for trap 0xA0FE.  You can use Get/SetTrapAddress to 
  61. ;    acccess it.    
  62. ;
  63.  
  64.  
  65. ;    The following ProcPtrs cannot be written in or called from a high-level 
  66. ;    language without the help of mixed mode or assembly glue because they 
  67. ;    use the following parameter-passing conventions:
  68. ;
  69. ;    typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
  70. ;    typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
  71. ;
  72. ;        In:
  73. ;            =>     r                        on stack
  74. ;            =>    pTE                        A3.L
  75. ;        Out:
  76. ;            none
  77. ;
  78. ;    typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
  79. ;
  80. ;        In:
  81. ;            =>     theChar                    D0.B
  82. ;            =>    pTE                        A3.L
  83. ;            =>    hTE                        A4.L
  84. ;        Out:
  85. ;            <=    Boolean                    Z bit of the CCR
  86. ;
  87. ;    typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
  88. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  89. ;    typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
  90. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  91. ;
  92. ;        In:
  93. ;            =>     textLen                    D0.W
  94. ;            =>    textOffset                D1.W
  95. ;            =>    textBufferPtr            A0.L
  96. ;            =>    pTE                        A3.L
  97. ;            =>    hTE                        A4.L
  98. ;        Out:
  99. ;            <=    unsigned short            D1.W
  100. ;
  101. ;    typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
  102. ;     unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr, 
  103. ;     short *lineStart, TEPtr pTE, TEHandle hTE);
  104. ;
  105. ;        In:
  106. ;            =>     styleRunLen                D0.W
  107. ;            =>    styleRunOffset            D1.W
  108. ;            =>    slop                    D2.W (low)
  109. ;            =>    direction                D2.W (high)
  110. ;            =>    textBufferPtr            A0.L
  111. ;            =>    lineStart                A2.L
  112. ;            =>    pTE                        A3.L
  113. ;            =>    hTE                        A4.L
  114. ;        Out:
  115. ;            <=    unsigned short            D1.W
  116. ;
  117. ;    typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
  118. ;     void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  119. ;
  120. ;        In:
  121. ;            =>     textOffset                D0.W
  122. ;            =>    drawLen                    D1.W
  123. ;            =>    textBufferPtr            A0.L
  124. ;            =>    pTE                        A3.L
  125. ;            =>    hTE                        A4.L
  126. ;        Out:
  127. ;            none
  128. ;
  129. ;    typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
  130. ;     unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
  131. ;     TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset, 
  132. ;     Boolean *pixelInChar);
  133. ;
  134. ;        In:
  135. ;            =>     styleRunLen                D0.W
  136. ;            =>    styleRunOffset            D1.W
  137. ;            =>    slop                    D2.W
  138. ;            =>    textBufferPtr            A0.L
  139. ;            =>    pTE                        A3.L
  140. ;            =>    hTE                        A4.L
  141. ;        Out:
  142. ;            <=    pixelWidth                D0.W (low)
  143. ;            <=    Boolean                    D0.W (high)
  144. ;            <=    charOffset                D1.W
  145. ;            <=    pixelInChar                D2.W
  146. ;
  147. ;    typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller, 
  148. ;     TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
  149. ;
  150. ;        In:
  151. ;            =>     currentPos                D0.W
  152. ;            =>    caller                    D2.W
  153. ;            =>    pTE                        A3.L
  154. ;            =>    hTE                        A4.L
  155. ;        Out:
  156. ;            <=    wordStart                D0.W
  157. ;            <=    wordEnd                    D1.W
  158. ;
  159. ;    typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
  160. ;       unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
  161. ;
  162. ;        In:
  163. ;            =>     pTE                        A3.L
  164. ;            =>    changeLength            D7.W
  165. ;        Out:
  166. ;            <=    lineStart                D2.W
  167. ;            <=    firstChar                D3.W
  168. ;            <=    lastChar                D4.W
  169. ;
  170. ;    typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
  171. ;                         short selector, GrafPtr *currentGrafPort, short *charPosition);
  172. ;
  173. ;        In:
  174. ;            =>     pTE                        A3.L
  175. ;            =>    firstChar                D3.W
  176. ;            =>    lastChar                D4.W
  177. ;            =>    selector                D7.W
  178. ;        Out:
  179. ;            <=    currentGrafPort            A0.L
  180. ;            <=    charPosition            D0.W
  181. ;            
  182. ;
  183.  
  184. TERec                    RECORD 0
  185. destRect                 ds        Rect            ; offset: $0 (0)
  186. viewRect                 ds        Rect            ; offset: $8 (8)
  187. selRect                     ds        Rect            ; offset: $10 (16)
  188. lineHeight                 ds.w    1                ; offset: $18 (24)
  189. fontAscent                 ds.w    1                ; offset: $1A (26)
  190. selPoint                 ds        Point            ; offset: $1C (28)
  191. selStart                 ds.w    1                ; offset: $20 (32)
  192. selEnd                     ds.w    1                ; offset: $22 (34)
  193. active                     ds.w    1                ; offset: $24 (36)
  194. wordBreak                 ds.l    1                ; offset: $26 (38)
  195. clickLoop                 ds.l    1                ; offset: $2A (42)
  196. clickTime                 ds.l    1                ; offset: $2E (46)
  197. clickLoc                 ds.w    1                ; offset: $32 (50)
  198. caretTime                 ds.l    1                ; offset: $34 (52)
  199. caretState                 ds.w    1                ; offset: $38 (56)
  200. just                     ds.w    1                ; offset: $3A (58)
  201. teLength                 ds.w    1                ; offset: $3C (60)
  202. hText                     ds.l    1                ; offset: $3E (62)
  203. hDispatchRec             ds.l    1                ; offset: $42 (66)        ;  added to replace recalBack & recalLines.  it's a handle anyway 
  204. clikStuff                 ds.w    1                ; offset: $46 (70)
  205. crOnly                     ds.w    1                ; offset: $48 (72)
  206. txFont                     ds.w    1                ; offset: $4A (74)
  207. txFace                     ds.w    1                ; offset: $4C (76)        ; txFace is unpacked byte
  208. txMode                     ds.w    1                ; offset: $4E (78)
  209. txSize                     ds.w    1                ; offset: $50 (80)
  210. inPort                     ds.l    1                ; offset: $52 (82)
  211. highHook                 ds.l    1                ; offset: $56 (86)
  212. caretHook                 ds.l    1                ; offset: $5A (90)
  213. nLines                     ds.w    1                ; offset: $5E (94)
  214. lineStarts                 ds.w    16001            ; offset: $60 (96)
  215. sizeof                     EQU *                    ; size:   $7D62 (32098)
  216.                         ENDR
  217.  
  218.                                                             ; Justification (word alignment) styles 
  219. teJustLeft                        EQU        0
  220. teJustCenter                    EQU        1
  221. teJustRight                        EQU        -1
  222. teForceLeft                        EQU        -2                    ; new names for the Justification (word alignment) styles 
  223. teFlushDefault                    EQU        0                    ;flush according to the line direction 
  224. teCenter                        EQU        1                    ;center justify (word alignment) 
  225. teFlushRight                    EQU        -1                    ;flush right for all scripts 
  226. teFlushLeft                        EQU        -2                    ;flush left for all scripts 
  227.  
  228.                                                             ; Set/Replace style modes 
  229. fontBit                            EQU        0                    ;set font
  230. faceBit                            EQU        1                    ;set face
  231. sizeBit                            EQU        2                    ;set size
  232. clrBit                            EQU        3                    ;set color
  233. addSizeBit                        EQU        4                    ;add size mode
  234. toggleBit                        EQU        5                    ;set faces in toggle mode
  235.  
  236.                                                             ; TESetStyle/TEContinuousStyle modes 
  237. doFont                            EQU        1                    ; set font (family) number
  238. doFace                            EQU        2                    ;set character style
  239. doSize                            EQU        4                    ;set type size
  240. doColor                            EQU        8                    ;set color
  241. doAll                            EQU        15                    ;set all attributes
  242. addSize                            EQU        16                    ;adjust type size
  243. doToggle                        EQU        32                    ;toggle mode for TESetStyle
  244.  
  245.                                                             ; offsets into TEDispatchRec 
  246. EOLHook                            EQU        0                    ;[UniversalProcPtr] TEEOLHook
  247. DRAWHook                        EQU        4                    ;[UniversalProcPtr] TEWidthHook
  248. WIDTHHook                        EQU        8                    ;[UniversalProcPtr] TEDrawHook
  249. HITTESTHook                        EQU        12                    ;[UniversalProcPtr] TEHitTestHook
  250. nWIDTHHook                        EQU        24                    ;[UniversalProcPtr] nTEWidthHook
  251. TextWidthHook                    EQU        28                    ;[UniversalProcPtr] TETextWidthHook
  252.  
  253.                                                             ; selectors for TECustomHook 
  254. intEOLHook                        EQU        0                    ;TEIntHook value
  255. intDrawHook                        EQU        1                    ;TEIntHook value
  256. intWidthHook                    EQU        2                    ;TEIntHook value
  257. intHitTestHook                    EQU        3                    ;TEIntHook value
  258. intNWidthHook                    EQU        6                    ;TEIntHook value for new version of WidthHook
  259. intTextWidthHook                EQU        7                    ;TEIntHook value for new TextWidthHook
  260. intInlineInputTSMTEPreUpdateHook EQU    8                    ;TEIntHook value for TSMTEPreUpdateProcPtr callback
  261. intInlineInputTSMTEPostUpdateHook EQU    9                    ;TEIntHook value for TSMTEPostUpdateProcPtr callback
  262.  
  263.                                                             ; feature or bit definitions for TEFeatureFlag 
  264. teFAutoScroll                    EQU        0                    ;00000001b
  265. teFTextBuffering                EQU        1                    ;00000010b
  266. teFOutlineHilite                EQU        2                    ;00000100b
  267. teFInlineInput                    EQU        3                    ;00001000b 
  268. teFUseWhiteBackground            EQU        4                    ;00010000b 
  269. teFUseInlineInput                EQU        5                    ;00100000b 
  270. teFInlineInputAutoScroll        EQU        6                    ;01000000b 
  271.  
  272.                                                             ; action for the new "bit (un)set" interface, TEFeatureFlag 
  273. teBitClear                        EQU        0
  274. teBitSet                        EQU        1                    ;set the selector bit
  275. teBitTest                        EQU        -1                    ;no change; just return the current setting
  276.  
  277.                                                             ;constants for identifying the routine that called FindWord 
  278. teWordSelect                    EQU        4                    ;clickExpand to select word
  279. teWordDrag                        EQU        8                    ;clickExpand to drag new word
  280. teFromFind                        EQU        12                    ;FindLine called it ($0C)
  281. teFromRecal                        EQU        16                    ;RecalLines called it ($10)      obsolete 
  282.  
  283.                                                             ;constants for identifying TEDoText selectors 
  284. teFind                            EQU        0                    ;TEDoText called for searching
  285. teHighlight                        EQU        1                    ;TEDoText called for highlighting
  286. teDraw                            EQU        -1                    ;TEDoText called for drawing text
  287. teCaret                            EQU        -2                    ;TEDoText called for drawing the caret
  288.  
  289.  
  290. Chars                    RECORD 0
  291. elements                 ds.b    32001
  292.                          ORG 32002
  293. sizeof                     EQU *                    ; size:   $7D02 (32002)
  294.                         ENDR
  295.  
  296.  
  297. ; typedef CharsPtr *                    CharsHandle
  298.  
  299. StyleRun                RECORD 0
  300. startChar                 ds.w    1                ; offset: $0 (0)        ; starting character position
  301. styleIndex                 ds.w    1                ; offset: $2 (2)        ; index in style table
  302. sizeof                     EQU *                    ; size:   $4 (4)
  303.                         ENDR
  304. STElement                RECORD 0
  305. stCount                     ds.w    1                ; offset: $0 (0)        ; number of runs in this style
  306. stHeight                 ds.w    1                ; offset: $2 (2)        ; line height
  307. stAscent                 ds.w    1                ; offset: $4 (4)        ; font ascent
  308. stFont                     ds.w    1                ; offset: $6 (6)        ; font (family) number
  309. stFace                     ds.w    1                ; offset: $8 (8)        ; character Style
  310. stSize                     ds.w    1                ; offset: $A (10)        ; size in points
  311. stColor                     ds        RGBColor        ; offset: $C (12)        ; absolute (RGB) color
  312. sizeof                     EQU *                    ; size:   $12 (18)
  313.                         ENDR
  314. TEStyleTable            RECORD 0
  315. elements                 ds.b    1777 * STElement.sizeof
  316. sizeof                     EQU *                    ; size:   $7CF2 (31986)
  317.                         ENDR
  318.  
  319.  
  320. ; typedef STPtr *                        STHandle
  321.  
  322. LHElement                RECORD 0
  323. lhHeight                 ds.w    1                ; offset: $0 (0)        ; maximum height in line
  324. lhAscent                 ds.w    1                ; offset: $2 (2)        ; maximum ascent in line
  325. sizeof                     EQU *                    ; size:   $4 (4)
  326.                         ENDR
  327. LHTable                    RECORD 0
  328. elements                 ds.b    8001 * LHElement.sizeof
  329. sizeof                     EQU *                    ; size:   $7D04 (32004)
  330.                         ENDR
  331.  
  332.  
  333. ; typedef LHPtr *                        LHHandle
  334.  
  335. ScrpSTElement            RECORD 0
  336. scrpStartChar             ds.l    1                ; offset: $0 (0)        ; starting character position
  337. scrpHeight                 ds.w    1                ; offset: $4 (4)
  338. scrpAscent                 ds.w    1                ; offset: $6 (6)
  339. scrpFont                 ds.w    1                ; offset: $8 (8)
  340. scrpFace                 ds.w    1                ; offset: $A (10)        ; unpacked byte
  341. scrpSize                 ds.w    1                ; offset: $C (12)
  342. scrpColor                 ds        RGBColor        ; offset: $E (14)
  343. sizeof                     EQU *                    ; size:   $14 (20)
  344.                         ENDR
  345. ;  ARRAY [0..1600] OF ScrpSTElement 
  346. ScrpSTTable                RECORD 0
  347. elements                 ds.b    1601 * ScrpSTElement.sizeof
  348. sizeof                     EQU *                    ; size:   $7D14 (32020)
  349.                         ENDR
  350.  
  351.  
  352. StScrpRec                RECORD 0
  353. scrpNStyles                 ds.w    1                ; offset: $0 (0)        ; number of styles in scrap
  354. scrpStyleTab             ds        ScrpSTTable        ; offset: $2 (2)        ; table of styles for scrap
  355. sizeof                     EQU *                    ; size:   $7D16 (32022)
  356.                         ENDR
  357. ; typedef struct StScrpRec *            StScrpPtr
  358.  
  359. ; typedef StScrpPtr *                    StScrpHandle
  360.  
  361. NullStRec                RECORD 0
  362. teReserved                 ds.l    1                ; offset: $0 (0)        ; reserved for future expansion
  363. nullScrap                 ds.l    1                ; offset: $4 (4)        ; handle to scrap style table
  364. sizeof                     EQU *                    ; size:   $8 (8)
  365.                         ENDR
  366. ; typedef struct NullStRec *            NullStPtr
  367.  
  368. ; typedef NullStPtr *                    NullStHandle
  369.  
  370. TEStyleRec                RECORD 0
  371. nRuns                     ds.w    1                ; offset: $0 (0)        ; number of style runs
  372. nStyles                     ds.w    1                ; offset: $2 (2)        ; size of style table
  373. styleTab                 ds.l    1                ; offset: $4 (4)        ; handle to style table
  374. lhTab                     ds.l    1                ; offset: $8 (8)        ; handle to line-height table
  375. teRefCon                 ds.l    1                ; offset: $C (12)        ; reserved for application use
  376. nullStyle                 ds.l    1                ; offset: $10 (16)        ; Handle to style set at null selection
  377. runs                     ds.b    8001 * StyleRun.sizeof ; offset: $14 (20) ; ARRAY [0..8000] OF StyleRun
  378. sizeof                     EQU *                    ; size:   $7D18 (32024)
  379.                         ENDR
  380. ; typedef struct TEStyleRec *            TEStylePtr
  381.  
  382. ; typedef TEStylePtr *                    TEStyleHandle
  383.  
  384. TextStyle                RECORD 0
  385. tsFont                     ds.w    1                ; offset: $0 (0)        ; font (family) number
  386. tsFace                     ds.w    1                ; offset: $2 (2)        ; character Style
  387. tsSize                     ds.w    1                ; offset: $4 (4)        ; size in point
  388. tsColor                     ds        RGBColor        ; offset: $6 (6)        ; absolute (RGB) color
  389. sizeof                     EQU *                    ; size:   $C (12)
  390.                         ENDR
  391. ; typedef struct TextStyle *            TextStylePtr
  392.  
  393. ; typedef TextStylePtr *                TextStyleHandle
  394.  
  395. ; typedef short                         TEIntHook
  396.  
  397.  
  398.                                                             ; feature bit 4 for TEFeatureFlag no longer in use 
  399. teFUseTextServices                EQU        4                    ;00010000b 
  400.  
  401. ;
  402. ; pascal Handle TEScrapHandle(void)
  403. ;
  404.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  405.         Macro
  406.         _TEScrapHandle        &dest=(sp)
  407.             move.l            $0AB4,&dest
  408.         EndM
  409.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  410.         IMPORT_CFM_FUNCTION TEScrapHandle
  411.     ENDIF
  412.  
  413.  
  414. ;
  415. ; pascal long TEGetScrapLength(void )
  416. ;
  417.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  418.         IMPORT_CFM_FUNCTION TEGetScrapLength
  419.     ENDIF
  420.  
  421.  
  422. ;
  423. ; pascal void TEInit(void )
  424. ;
  425.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  426.         _TEInit:    OPWORD    $A9CC
  427.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  428.         IMPORT_CFM_FUNCTION TEInit
  429.     ENDIF
  430.  
  431. ;
  432. ; pascal TEHandle TENew(const Rect *destRect, const Rect *viewRect)
  433. ;
  434.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  435.         _TENew:    OPWORD    $A9D2
  436.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  437.         IMPORT_CFM_FUNCTION TENew
  438.     ENDIF
  439.  
  440. ;
  441. ; pascal void TEDispose(TEHandle hTE)
  442. ;
  443.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  444.         _TEDispose:    OPWORD    $A9CD
  445.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  446.         IMPORT_CFM_FUNCTION TEDispose
  447.     ENDIF
  448.  
  449. ;
  450. ; pascal void TESetText(const void *text, long length, TEHandle hTE)
  451. ;
  452.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  453.         _TESetText:    OPWORD    $A9CF
  454.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  455.         IMPORT_CFM_FUNCTION TESetText
  456.     ENDIF
  457.  
  458. ;
  459. ; pascal CharsHandle TEGetText(TEHandle hTE)
  460. ;
  461.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  462.         _TEGetText:    OPWORD    $A9CB
  463.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  464.         IMPORT_CFM_FUNCTION TEGetText
  465.     ENDIF
  466.  
  467. ;
  468. ; pascal void TEIdle(TEHandle hTE)
  469. ;
  470.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  471.         _TEIdle:    OPWORD    $A9DA
  472.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  473.         IMPORT_CFM_FUNCTION TEIdle
  474.     ENDIF
  475.  
  476. ;
  477. ; pascal void TESetSelect(long selStart, long selEnd, TEHandle hTE)
  478. ;
  479.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  480.         _TESetSelect:    OPWORD    $A9D1
  481.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  482.         IMPORT_CFM_FUNCTION TESetSelect
  483.     ENDIF
  484.  
  485. ;
  486. ; pascal void TEActivate(TEHandle hTE)
  487. ;
  488.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  489.         _TEActivate:    OPWORD    $A9D8
  490.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  491.         IMPORT_CFM_FUNCTION TEActivate
  492.     ENDIF
  493.  
  494. ;
  495. ; pascal void TEDeactivate(TEHandle hTE)
  496. ;
  497.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  498.         _TEDeactivate:    OPWORD    $A9D9
  499.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  500.         IMPORT_CFM_FUNCTION TEDeactivate
  501.     ENDIF
  502.  
  503. ;
  504. ; pascal void TEKey(CharParameter key, TEHandle hTE)
  505. ;
  506.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  507.         _TEKey:    OPWORD    $A9DC
  508.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  509.         IMPORT_CFM_FUNCTION TEKey
  510.     ENDIF
  511.  
  512. ;
  513. ; pascal void TECut(TEHandle hTE)
  514. ;
  515.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  516.         _TECut:    OPWORD    $A9D6
  517.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  518.         IMPORT_CFM_FUNCTION TECut
  519.     ENDIF
  520.  
  521. ;
  522. ; pascal void TECopy(TEHandle hTE)
  523. ;
  524.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  525.         _TECopy:    OPWORD    $A9D5
  526.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  527.         IMPORT_CFM_FUNCTION TECopy
  528.     ENDIF
  529.  
  530. ;
  531. ; pascal void TEPaste(TEHandle hTE)
  532. ;
  533.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  534.         _TEPaste:    OPWORD    $A9DB
  535.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  536.         IMPORT_CFM_FUNCTION TEPaste
  537.     ENDIF
  538.  
  539. ;
  540. ; pascal void TEDelete(TEHandle hTE)
  541. ;
  542.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  543.         _TEDelete:    OPWORD    $A9D7
  544.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  545.         IMPORT_CFM_FUNCTION TEDelete
  546.     ENDIF
  547.  
  548. ;
  549. ; pascal void TEInsert(const void *text, long length, TEHandle hTE)
  550. ;
  551.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  552.         _TEInsert:    OPWORD    $A9DE
  553.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  554.         IMPORT_CFM_FUNCTION TEInsert
  555.     ENDIF
  556.  
  557. ;
  558. ; pascal void TESetAlignment(short just, TEHandle hTE)
  559. ;
  560.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  561.         _TESetAlignment:    OPWORD    $A9DF
  562.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  563.         IMPORT_CFM_FUNCTION TESetAlignment
  564.     ENDIF
  565.  
  566. ;
  567. ; pascal void TEUpdate(const Rect *rUpdate, TEHandle hTE)
  568. ;
  569.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  570.         _TEUpdate:    OPWORD    $A9D3
  571.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  572.         IMPORT_CFM_FUNCTION TEUpdate
  573.     ENDIF
  574.  
  575. ;
  576. ; pascal void TETextBox(const void *text, long length, const Rect *box, short just)
  577. ;
  578.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  579.         _TETextBox:    OPWORD    $A9CE
  580.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  581.         IMPORT_CFM_FUNCTION TETextBox
  582.     ENDIF
  583.  
  584. ;
  585. ; pascal void TEScroll(short dh, short dv, TEHandle hTE)
  586. ;
  587.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  588.         _TEScroll:    OPWORD    $A9DD
  589.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  590.         IMPORT_CFM_FUNCTION TEScroll
  591.     ENDIF
  592.  
  593. ;
  594. ; pascal void TESelView(TEHandle hTE)
  595. ;
  596.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  597.         _TESelView:    OPWORD    $A811
  598.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  599.         IMPORT_CFM_FUNCTION TESelView
  600.     ENDIF
  601.  
  602. ;
  603. ; pascal void TEPinScroll(short dh, short dv, TEHandle hTE)
  604. ;
  605.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  606.         _TEPinScroll:    OPWORD    $A812
  607.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  608.         IMPORT_CFM_FUNCTION TEPinScroll
  609.     ENDIF
  610.  
  611. ;
  612. ; pascal void TEAutoView(Boolean fAuto, TEHandle hTE)
  613. ;
  614.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  615.         _TEAutoView:    OPWORD    $A813
  616.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  617.         IMPORT_CFM_FUNCTION TEAutoView
  618.     ENDIF
  619.  
  620. ;
  621. ; pascal void TECalText(TEHandle hTE)
  622. ;
  623.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  624.         _TECalText:    OPWORD    $A9D0
  625.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  626.         IMPORT_CFM_FUNCTION TECalText
  627.     ENDIF
  628.  
  629. ;
  630. ; pascal short TEGetOffset(Point pt, TEHandle hTE)
  631. ;
  632.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  633.         _TEGetOffset:    OPWORD    $A83C
  634.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  635.         IMPORT_CFM_FUNCTION TEGetOffset
  636.     ENDIF
  637.  
  638. ;
  639. ; pascal Point TEGetPoint(short offset, TEHandle hTE)
  640. ;
  641.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  642.         Macro
  643.         _TEGetPoint
  644.             move.w              #$0008,-(sp)
  645.             dc.w                $A83D
  646.         EndM
  647.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  648.         IMPORT_CFM_FUNCTION TEGetPoint
  649.     ENDIF
  650.  
  651. ;
  652. ; pascal void TEClick(Point pt, Boolean fExtend, TEHandle h)
  653. ;
  654.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  655.         _TEClick:    OPWORD    $A9D4
  656.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  657.         IMPORT_CFM_FUNCTION TEClick
  658.     ENDIF
  659.  
  660. ;
  661. ; pascal TEHandle TEStyleNew(const Rect *destRect, const Rect *viewRect)
  662. ;
  663.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  664.         _TEStyleNew:    OPWORD    $A83E
  665.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  666.         IMPORT_CFM_FUNCTION TEStyleNew
  667.     ENDIF
  668.  
  669. ;
  670. ; pascal void TESetStyleHandle(TEStyleHandle theHandle, TEHandle hTE)
  671. ;
  672.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  673.         Macro
  674.         _TESetStyleHandle
  675.             move.w              #$0005,-(sp)
  676.             dc.w                $A83D
  677.         EndM
  678.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  679.         IMPORT_CFM_FUNCTION TESetStyleHandle
  680.     ENDIF
  681.  
  682. ;
  683. ; pascal TEStyleHandle TEGetStyleHandle(TEHandle hTE)
  684. ;
  685.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  686.         Macro
  687.         _TEGetStyleHandle
  688.             move.w              #$0004,-(sp)
  689.             dc.w                $A83D
  690.         EndM
  691.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  692.         IMPORT_CFM_FUNCTION TEGetStyleHandle
  693.     ENDIF
  694.  
  695. ;
  696. ; pascal void TEGetStyle(short offset, TextStyle *theStyle, short *lineHeight, short *fontAscent, TEHandle hTE)
  697. ;
  698.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  699.         Macro
  700.         _TEGetStyle
  701.             move.w              #$0003,-(sp)
  702.             dc.w                $A83D
  703.         EndM
  704.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  705.         IMPORT_CFM_FUNCTION TEGetStyle
  706.     ENDIF
  707.  
  708. ;
  709. ; pascal void TEStylePaste(TEHandle hTE)
  710. ;
  711.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  712.         Macro
  713.         _TEStylePaste
  714.             move.w              #$0000,-(sp)
  715.             dc.w                $A83D
  716.         EndM
  717.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  718.         IMPORT_CFM_FUNCTION TEStylePaste
  719.     ENDIF
  720.  
  721. ;
  722. ; pascal void TESetStyle(short mode, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  723. ;
  724.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  725.         Macro
  726.         _TESetStyle
  727.             move.w              #$0001,-(sp)
  728.             dc.w                $A83D
  729.         EndM
  730.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  731.         IMPORT_CFM_FUNCTION TESetStyle
  732.     ENDIF
  733.  
  734. ;
  735. ; pascal void TEReplaceStyle(short mode, const TextStyle *oldStyle, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  736. ;
  737.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  738.         Macro
  739.         _TEReplaceStyle
  740.             move.w              #$0002,-(sp)
  741.             dc.w                $A83D
  742.         EndM
  743.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  744.         IMPORT_CFM_FUNCTION TEReplaceStyle
  745.     ENDIF
  746.  
  747. ;
  748. ; pascal StScrpHandle TEGetStyleScrapHandle(TEHandle hTE)
  749. ;
  750.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  751.         Macro
  752.         _TEGetStyleScrapHandle
  753.             move.w              #$0006,-(sp)
  754.             dc.w                $A83D
  755.         EndM
  756.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  757.         IMPORT_CFM_FUNCTION TEGetStyleScrapHandle
  758.     ENDIF
  759.  
  760. ;
  761. ; pascal void TEStyleInsert(const void *text, long length, StScrpHandle hST, TEHandle hTE)
  762. ;
  763.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  764.         Macro
  765.         _TEStyleInsert
  766.             move.w              #$0007,-(sp)
  767.             dc.w                $A83D
  768.         EndM
  769.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  770.         IMPORT_CFM_FUNCTION TEStyleInsert
  771.     ENDIF
  772.  
  773. ;
  774. ; pascal long TEGetHeight(long endLine, long startLine, TEHandle hTE)
  775. ;
  776.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  777.         Macro
  778.         _TEGetHeight
  779.             move.w              #$0009,-(sp)
  780.             dc.w                $A83D
  781.         EndM
  782.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  783.         IMPORT_CFM_FUNCTION TEGetHeight
  784.     ENDIF
  785.  
  786. ;
  787. ; pascal Boolean TEContinuousStyle(short *mode, TextStyle *aStyle, TEHandle hTE)
  788. ;
  789.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  790.         Macro
  791.         _TEContinuousStyle
  792.             move.w              #$000A,-(sp)
  793.             dc.w                $A83D
  794.         EndM
  795.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  796.         IMPORT_CFM_FUNCTION TEContinuousStyle
  797.     ENDIF
  798.  
  799. ;
  800. ; pascal void TEUseStyleScrap(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw, TEHandle hTE)
  801. ;
  802.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  803.         Macro
  804.         _TEUseStyleScrap
  805.             move.w              #$000B,-(sp)
  806.             dc.w                $A83D
  807.         EndM
  808.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  809.         IMPORT_CFM_FUNCTION TEUseStyleScrap
  810.     ENDIF
  811.  
  812. ;
  813. ; pascal void TECustomHook(TEIntHook which, UniversalProcPtr *addr, TEHandle hTE)
  814. ;
  815.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  816.         Macro
  817.         _TECustomHook
  818.             move.w              #$000C,-(sp)
  819.             dc.w                $A83D
  820.         EndM
  821.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  822.         IMPORT_CFM_FUNCTION TECustomHook
  823.     ENDIF
  824.  
  825. ;
  826. ; pascal long TENumStyles(long rangeStart, long rangeEnd, TEHandle hTE)
  827. ;
  828.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  829.         Macro
  830.         _TENumStyles
  831.             move.w              #$000D,-(sp)
  832.             dc.w                $A83D
  833.         EndM
  834.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  835.         IMPORT_CFM_FUNCTION TENumStyles
  836.     ENDIF
  837.  
  838. ;
  839. ; pascal short TEFeatureFlag(short feature, short action, TEHandle hTE)
  840. ;
  841.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  842.         Macro
  843.         _TEFeatureFlag
  844.             move.w              #$000E,-(sp)
  845.             dc.w                $A83D
  846.         EndM
  847.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  848.         IMPORT_CFM_FUNCTION TEFeatureFlag
  849.     ENDIF
  850.  
  851. ;
  852. ; pascal OSErr TEGetHiliteRgn(RgnHandle region, TEHandle hTE)
  853. ;
  854.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  855.         Macro
  856.         _TEGetHiliteRgn
  857.             move.w              #$000F,-(sp)
  858.             dc.w                $A83D
  859.         EndM
  860.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  861.         IMPORT_CFM_FUNCTION TEGetHiliteRgn
  862.     ENDIF
  863.  
  864. ;
  865. ; pascal void TESetScrapLength(long length)
  866. ;
  867.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  868.         IMPORT_CFM_FUNCTION TESetScrapLength
  869.     ENDIF
  870.  
  871. ;
  872. ; pascal OSErr TEFromScrap(void )
  873. ;
  874.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  875.         IMPORT_CFM_FUNCTION TEFromScrap
  876.     ENDIF
  877.  
  878. ;
  879. ; pascal OSErr TEToScrap(void )
  880. ;
  881.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  882.         IMPORT_CFM_FUNCTION TEToScrap
  883.     ENDIF
  884.  
  885. ;
  886. ; pascal void TESetClickLoop(TEClickLoopUPP clikProc, TEHandle hTE)
  887. ;
  888.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  889.         IMPORT_CFM_FUNCTION TESetClickLoop
  890.     ENDIF
  891.  
  892. ;
  893. ; pascal void TESetWordBreak(WordBreakUPP wBrkProc, TEHandle hTE)
  894. ;
  895.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  896.         IMPORT_CFM_FUNCTION TESetWordBreak
  897.     ENDIF
  898.  
  899.  
  900.     IF OLDROUTINENAMES THEN
  901.     ENDIF    ; OLDROUTINENAMES
  902.     ENDIF ; __TEXTEDIT__ 
  903.  
  904.